@extends('admin.layout.index')
@section('content')

@if (count($errors) > 0)
    <div class="mws-form-message warning">
    	验证失败
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

<div class="mws-panel grid_8">
  <div class="mws-panel-header">
    <span>{{ $title }}</span></div>
  <div class="mws-panel-body no-padding">
    <form class="mws-form" action="/admin/activity/{{$data['id']}}" method="post" enctype="multipart/form-data">
      {{ csrf_field() }}                                                      
    {{ method_field('put') }}
      <div class="mws-form-inline">
        <div class="mws-form-row">
          <label class="mws-form-label">活动位关键字</label>
          <div class="mws-form-item">
            <input type="text" class="small" name='keywords' value="{{$data['keywords']}}"> 
          </div>
        </div>
        <div class="mws-form-row">
          <label class="mws-form-label">活动位修饰词</label>
          <div class="mws-form-item">
            <input type="text" class="small" name='description' value="{{$data['description']}}">   
          </div>
        </div>
        <div class="mws-form-row">
          <label class="mws-form-label">活动位图片</label>
          <div class="mws-form-item" style="width:420px;">
            <input type="file" class="small" name='photo' value="" >     <span style="color:red">请上传尺寸为296*314的图片</span>
          </div>
        </div>
        
        <div class="mws-form-row">
          <label class="mws-form-label">活动位链接</label>
          <div class="mws-form-item">
            <input type="text" class="small" name='link' value="{{$data['link']}}">   
          </div>
        </div>
        <div class="mws-form-row">
          <label class="mws-form-label">是否上架</label>
          <div class="mws-form-item">
            <select class="small" name='status'>
              <option value='0' {{$data['status']=='0'?'selected':''}}>不上架</option>
              <option value='1' {{$data['status']=='1'?'selected':''}}>上架</option>
             </select>
          </div>
        </div>
      </div>
      <div class="mws-button-row">
        <input type="submit" value="修改" class="btn btn-danger">
        <input type="reset" value="重置" class="btn "></div>
    </form>
  </div>
</div>
@endsection